<template>
	<view class="content">
		<u-sticky>
			<view class="ui_head">
				<view class="ui_head_search">
					<u--input shape="circle" placeholder="搜索商品" prefixIcon="search"
						prefixIconStyle="font-size: 22px;color: #909399"></u--input>
				</view>
				<view class="ui_head_tabs">
					<view class="ui_head_tabs_item s">销量优先</view>
					<view class="ui_head_tabs_line"></view>
					<view class="ui_head_tabs_item">
						<view class="ui_head_tabs_item_text">库存排序</view>
						<image class="ui_head_tabs_item_icon" src="/static/img/icon_sort_not.png" />
					</view>
				</view>
			</view>
		</u-sticky>

		<view class="ui_info">
			<view class="ui_info_item">
				<image class="ui_info_item_bg" src="/static/img/icon_stock_left.png" />
				<image class="ui_info_item_icon" src="/static/img/icon_shop_num.png" />
				<view class="ui_info_item_text">商品总数</view>
				<view class="ui_info_item_num">27</view>
			</view>
			<view class="ui_info_item">
				<image class="ui_info_item_bg" src="/static/img/icon_stock_right.png" />
				<image class="ui_info_item_icon" src="/static/img/icon_stock_num.png" />
				<view class="ui_info_item_text">库存总数</view>
				<view class="ui_info_item_num">2600</view>
			</view>
		</view>

		<view class="item" v-for="(item,index) in 4" :key="index">
			<view class="item_content">
				<image class="item_content_img"
					src="https://img0.baidu.com/it/u=2748363669,2526559495&fm=253&fmt=auto&app=120&f=JPEG?w=760&h=760" />
				<view class="item_content_title">鳗漫养manmanyang 鳗鱼肽赋活水</view>
				<view class="item_content_info">
					<view class="item_content_info_left">120ml/瓶</view>
					<view class="item_content_info_right">销量：265</view>
				</view>
			</view>
			<view class="item_bottom">
				<view class="item_bottom_stock">
					剩余库存：<p>1000</p>
				</view>
				<view class="item_bottom_btn">去订货</view>
			</view>
		</view>
		
		<view style="height: 240rpx;"></view>

		<view class="ui_bottom">
			<view class="ui_bottom_item" @click="goTo('/pages/user/stock_detail')">查看明细</view>
			<view class="ui_bottom_item s">立即订货</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {

			}
		},
		methods: {
			goTo(url) {
				console.log(url)
				this.$util.navTo(url)
			},

		}
	}
</script>

<style lang="less">
	.content {
		width: 750rpx;
		position: relative;
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;

		.ui_head {
			width: 750rpx;
			display: flex;
			flex-direction: column;
			background-color: white;

			&_search {
				width: 710rpx;
				margin-left: 20rpx;
			}

			&_tabs {
				width: 750rpx;
				height: 82rpx;
				display: flex;
				align-items: center;

				&_item {
					flex: 1;
					display: flex;
					align-items: center;
					justify-content: center;
					font-family: PingFang SC;
					font-weight: 500;
					font-size: 26rpx;

					&_icon {
						width: 32rpx;
						height: 32rpx;
					}
				}

				.s {
					color: #9F6F26;
				}

				&_line {
					width: 1rpx;
					height: 26rpx;
					background: #CCCCCC;
				}
			}
		}

		.item {
			margin-top: 20rpx;
			width: 714rpx;
			background: #FFFFFF;
			border-radius: 10rpx;
			display: flex;
			flex-direction: column;

			&_content {
				margin-left: 25rpx;
				margin-top: 30rpx;
				margin-bottom: 22rpx;
				display: flex;
				position: relative;

				&_img {
					width: 130rpx;
					height: 130rpx;
					background: #F4F4F4;
					border-radius: 10rpx;
				}

				&_title {
					width: 510rpx;
					margin-left: 20rpx;
					font-family: PingFang SC;
					font-weight: bold;
					font-size: 28rpx;
					color: #333333;
					line-height: 36rpx;
				}

				&_info {
					position: absolute;
					top: 100rpx;
					left: 147rpx;
					width: 510rpx;
					display: flex;
					justify-content: space-between;
					font-family: PingFang SC;
					font-weight: 500;
					font-size: 24rpx;
					color: #666666;
					line-height: 36rpx;
				}
			}

			&_bottom {
				width: 714rpx;
				display: flex;
				height: 60rpx;
				align-items: center;
				margin-bottom: 25rpx;

				&_stock {
					flex: 1;
					margin-left: 25rpx;
					display: flex;
					align-items: center;
					font-family: PingFang SC;
					font-weight: 500;
					font-size: 24rpx;
					color: #333333;
					line-height: 36rpx;

					p {
						margin-left: 10rpx;
						color: #9F6F26;
						font-size: 36rpx;
					}
				}

				&_btn {
					width: 160rpx;
					line-height: 60rpx;
					text-align: center;
					background: linear-gradient(90deg, #C7974E, #986B28);
					border-radius: 30rpx;
					font-family: PingFang SC;
					font-weight: 500;
					font-size: 26rpx;
					color: #FFFFFF;
					margin-right: 24rpx;
				}
			}
		}

		.ui_info {
			margin-top: 20rpx;
			display: flex;
			justify-content: space-between;
			width: 702rpx;

			&_item {
				width: 340rpx;
				height: 140rpx;
				border-radius: 20rpx;
				border: 1px solid #FFFFFF;
				position: relative;
				background-color: #fff;

				&_bg {
					position: absolute;
					top: 0;
					left: 0;
					width: 140rpx;
					height: 140rpx;
					z-index: 888;
				}

				&_icon {
					margin-top: 18rpx;
					margin-left: 22rpx;
					width: 48rpx;
					height: 48rpx;
				}

				&_text {
					position: absolute;
					left: 75rpx;
					top: 25rpx;
					font-family: PingFang SC;
					font-weight: bold;
					font-size: 26rpx;
					color: #333333;
				}

				&_num {
					margin-top: -5rpx;
					margin-left: 30rpx;
					font-family: D-DIN Condensed;
					font-weight: bold;
					font-size: 48rpx;
					color: #333333;
				}
			}
		}
		.ui_bottom {
			z-index: 999;
			width: 750rpx;
			height: 164rpx;
			display: flex;
			justify-content: space-around;
			background-color: #fff;
			position: fixed;
			bottom: 0;
			left: 0;
		
			&_item {
				margin-top: 20rpx;
				width: 330rpx;
				line-height: 90rpx;
				height: 90rpx;
				text-align: center;
				font-family: PingFang SC;
				font-weight: bold;
				font-size: 32rpx;
				color: #666666;
				background: #FFFFFF;
				border-radius: 45rpx;
				border: 1px solid #C4C9D8;
			}
			.s {
				background: linear-gradient(90deg, #C7974E, #986B28);
				color: #fff;
			}
		}
	}
</style>